import request from '@/utils/request'

// 查询知识库列表
export function getKnowList(query) {
  return request({
    url: 'know/knowBase/list',
    method: 'get',
    params: query
  })
}

// 获取任务列表
export function queryTaskList(data) {
  return request({
    url: 'know/jobWork/listfhNoPage',
    method: 'post',
    data: data
  })
}

// 新增任务
export function addTask(data) {
  return request({
    url: 'know/jobWork/addfh',
    method: 'post',
    data: data
  })
}

// 修改任务
export function updateTask(data) {
  return request({
    url: 'know/jobWork/editfhNew',
    method: 'post',
    data: data
  })
}

// 修改子任务
export function updateTaskChild(data) {
  return request({
    url: 'know/jobWorkSub/editfh',
    method: 'post',
    data: data
  })
}

// 删除任务
export function delTask(data) {
  return request({
    url: 'know/jobWork/removefh',
    method: 'post',
    data: data
  })
}

// 子任务转换
export function taskChildConversion(data) {
    return request({
      url: 'know/jobWork/editfh',
      method: 'post',
      data: data
    })
  }